package imobiliaria2

/**
 * LoginTagLib
 * A taglib library provides a set of reusable tags to help rendering the views.
 */
class LoginTagLib {
  def loginControl = {
    if(session.Usuario){
      out << """<span style="color:white">Oi ${session.Usuario.nome}</span>"""
      out << """<span style="color:white">[${link(action:"logout", controller:"Usuario"){"Logout"}}]</span>"""
    } else {
      out << """<span style="color:white">[${link(action:"login", controller:"Usuario"){"Login"}}]</span>"""      
    }
  }
}
